var $ = require("../../utils/Ajax.js");
Page({
  data: {
    // 图片前缀路径 - (全局)
    PictureUrl: getApp().PictureUrl,
    StoreTeaData:[]
  },

  onLoad: function (options) {
    var that = this;
    wx.setNavigationBarTitle({
      title: "存茶转卖"
    }) 
    $.Ajax("api/saleTea", "GET", {}, function (res) {
      if(res.s){
        that.setData({
          StoreTeaData: res.d.sakeTea
        })
      }else{
        wx.showToast({
          title: res.m,
          icon: 'success',
          duration: 1500
        })
      }
    })
  },

  onShow: function () {

  },

  // 点击存茶列表
  StoreTeaDetails: function(e){
    var Id = e.currentTarget.dataset.id;
    var GoodsId = e.currentTarget.dataset.goodsid;
    wx.navigateTo({
      url: '../StoreTeaDetails/StoreTeaDetails?Id=' + Id + "&GoodsId=" + GoodsId,
    })
  }
})